﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="ViewProfile.aspx.vb" Inherits="WebApplication1.ViewProfile" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <p style="font-size: xx-large; font-weight: bold">
        &nbsp;<asp:Label ID="lb_profile" runat="server" 
            Text="Label"></asp:Label>
        &#39;s&nbsp;Profile
    </p>
    <br />

    <div>
    
        <asp:DetailsView ID="DetailsView1" runat="server" Height="50px" Width="125px" 
            AutoGenerateRows="False" DataKeyNames="dinerID" DataSourceID="SqlDataSource1">
            <Fields>
                <asp:TemplateField>
                    <ItemTemplate>
                        <asp:Image src='<%# Eval("protrait") %>' ID="Image1" runat="server" Height="250px" Width="250px" />
                    </ItemTemplate>
                </asp:TemplateField>
            </Fields>
        </asp:DetailsView>
    
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:SpiritConnString %>" 
            ProviderName="<%$ ConnectionStrings:SpiritConnString.ProviderName %>" 
            SelectCommand="SELECT [dinerID], [protrait] FROM [UserProfile] WHERE ([dinerID] = ?)">
            <SelectParameters>
                <asp:QueryStringParameter Name="dinerID" QueryStringField="dinerID" 
                    Type="String" />
            </SelectParameters>
        </asp:SqlDataSource>

        <br />
    
    </div>
    <br /><br /><br /><br />
    <div>
        <p style="font-size: medium; font-weight: bold">
        &nbsp;<asp:Label ID="lb_comment" 
                runat="server" Text="Label"></asp:Label>
            &#39;s&nbsp;Comment
        </p>
    
        <asp:DataList ID="DataList1" runat="server" DataSourceID="SqlDataSource2" 
            BackColor="LightGoldenrodYellow" BorderColor="Tan" BorderWidth="1px" 
            CellPadding="2" ForeColor="Black" Width="250px">
            <AlternatingItemStyle BackColor="PaleGoldenrod" />
            <FooterStyle BackColor="Tan" />
            <HeaderStyle BackColor="Tan" Font-Bold="True" />
            <ItemTemplate>
                <p style="font-size: small; font-style: italic">
                    <asp:HyperLink ID="HyperLink3" runat="server" NavigateUrl='<%# Eval("spirit_fkid","nonLoginDetails.aspx?ID={0}") %>'>
                    Title:
                    <asp:Label ID="TitleLabel" runat="server" Text='<%# Eval("Title") %>' />
                    </asp:HyperLink><br /></p><p style="text-align: right">
                    Comment Time: <asp:Label ID="TitleLabel2" runat="server" Text='<%# Eval("commentDate")%>' />
                </p></ItemTemplate><SelectedItemStyle 
                BackColor="DarkSlateBlue" ForeColor="GhostWhite" /></asp:DataList><asp:SqlDataSource 
            ID="SqlDataSource2" runat="server" 
            ConnectionString="<%$ ConnectionStrings:SpiritConnString %>" 
            ProviderName="<%$ ConnectionStrings:SpiritConnString.ProviderName %>" 
            
            
            SelectCommand="SELECT [ID], [Author], [Title], [Comment], [commentDate], [diner_fkid], [Spirit_fkid] FROM [comment] WHERE ([diner_fkid] = ?)"><SelectParameters>
                <asp:QueryStringParameter Name="diner_fkid" QueryStringField="dinerID" 
                    Type="String" />
            </SelectParameters>
        </asp:SqlDataSource>
    </div>

    <div>
        <p style="font-size: medium; font-weight: bold">
         <asp:Label ID="lb_upload" 
                runat="server" Text="Label"></asp:Label>&#39;s Upload </p><asp:DataList ID="DataList2" runat="server" DataKeyField="ID" 
            DataSourceID="SqlDataSource3" Width="250px" 
            BackColor="LightGoldenrodYellow" BorderColor="Tan" BorderWidth="1px" 
            CellPadding="2" ForeColor="Black"><AlternatingItemStyle 
                BackColor="PaleGoldenrod" /><FooterStyle BackColor="Tan" /><HeaderStyle 
                BackColor="Tan" Font-Bold="True" /><ItemTemplate>
                <asp:HyperLink ID="HyperLink3" runat="server" NavigateUrl='<%# Eval("ID","nonLoginDetails.aspx?ID={0}") %>'>
                    Spirit Name: <asp:Label ID="spiritNameLabel" runat="server" Text='<%# Eval("spiritName") %>' /><br />
                    <asp:Image ID="Image2" runat="server" src='<%# Eval("picture") %>' Height="100px" Width="100px" />
                </asp:HyperLink><br />Upload Time: <asp:Label ID="uploadDateLabel" runat="server" Text='<%# Eval("uploadDate") %>' />
                    <br />
                    <br />
                    
                    
                    </ItemTemplate><SelectedItemStyle BackColor="DarkSlateBlue" 
                ForeColor="GhostWhite" /></asp:DataList>
        
        
        <asp:SqlDataSource ID="SqlDataSource3" runat="server" 
            ConnectionString="<%$ ConnectionStrings:SpiritConnString %>" 
            ProviderName="<%$ ConnectionStrings:SpiritConnString.ProviderName %>" 
            SelectCommand="SELECT [diner_fkid], [uploadDate], [picture], [spiritName], [ID] FROM [SpiritList] WHERE ([diner_fkid] = ?)"><SelectParameters><asp:QueryStringParameter 
                    Name="diner_fkid" QueryStringField="dinerID" Type="String" /></SelectParameters></asp:SqlDataSource></div><p>
    </p>

    <br /><br /><br /><br /><br />


    <div style="position:absolute; top: 400px; left:520px; width:570px; height:600px">
    <p style="font-size: x-large; font-weight: bold">
    Detail Imformation </p><asp:DataList ID="DataList3" runat="server" 
            DataKeyField="dinerID" DataSourceID="SqlDataSource4">
            <ItemTemplate>
                    <p style="font-size: large; color: #0000FF"  >
                    First Name: <br /><asp:Label ID="firstNameLabel" runat="server" Text='<%# Eval("firstName") %>' />
                    <br /><br />
                    Last Name: <br /><asp:Label ID="lastNameLabel" runat="server" Text='<%# Eval("lastName") %>' />
                    <br /><br />
                    Gender: <br /><asp:Label ID="genderLabel" runat="server" Text='<%# Eval("gender") %>' />
                    <br /><br />
                    Nationality: <br /><asp:Label ID="nationality1" runat="server" Text='<%# Eval("nationality") %>' />
                    <br /><br />
                    Date Of Birth: <br /><asp:Label ID="dateOfBirthLabel" runat="server" Text='<%# Eval("dateOfBirth") %>' />
                    <br /><br />
                    My Description: <br /><asp:Label ID="myDescription1" runat="server" Text='<%# Eval("myDescription") %>' />
                    <br /><br />
                    Date Of Register: <br /><asp:Label ID="dateOfRegisterLabel" runat="server"  Text='<%# Eval("dateOfRegister") %>' />
                    <br /><br />
                    </p>
<br />
</ItemTemplate></asp:DataList>
        
    <asp:SqlDataSource ID="SqlDataSource4" runat="server" 
            ConnectionString="<%$ ConnectionStrings:SpiritConnString %>" 
            ProviderName="<%$ ConnectionStrings:SpiritConnString.ProviderName %>" 
            
            SelectCommand="SELECT [dinerID], [firstName], [lastName], [gender], [nationality], [dateOfBirth], [myDescription], [dateOfRegister] FROM [UserProfile] WHERE ([dinerID] = ?)"><SelectParameters><asp:QueryStringParameter 
                    Name="dinerID" QueryStringField="dinerID" Type="String" /></SelectParameters></asp:SqlDataSource></div>
</asp:Content>
